const mongoose = require('mongoose')
const Schema = mongoose.Schema
// user模型 --> users集合

const UserType = {
  username: Number, // 职工号/学号
  password: String,
  name: String,
  gender: Number, // 1男 2女
  role: Number, // 1管理员 2教师 3学生
  phone: Number,
  email: String,
  avatar: String // 头像
}
const UserModel = mongoose.model('user', new Schema(UserType))

module.exports = UserModel
